import request from '@/utils/request'

export function getUserSimple() {
  return request({
    url: '/sys/user/simple',
    method: 'get'
  })
}

export function getSysUser(params) {
  return request({
    url: '/sys/user',
    method: 'get',
    params
  })
}

/**
 * @description: 删除员工
 * @param {*} id 员工id
 * @return {*}
 */
export function delEmployee(id) {
  return request({
    method: 'delete',
    url: `/sys/user/${id}`
  })
}
/**
 * @description:新增员工
 */
export function addEmployee(data) {
  return request({
    method: 'post',
    url: '/sys/user',
    data
  })
}
/**
 * @description: 导入excel
 * @param {*} data
 * @return {*}
 */
export function importEmployees(data) {
  return request({
    url: '/sys/user/batch',
    method: 'post',
    data
  })
}
